<div class="info">
<h1 class="font_h1">Người dùng và phân quyền</h1>
<?php if(isset($error))  : ?>
<h2 class="error_red"><?php echo $error;?></h2>
<?php endif;?>
<form action="<?php echo base_url().'admin/setting/user_add/'.@$uid?>" method="POST" enctype="multipart/form-data" id="frm_add">
<table class="table1">
    <tr>
                <td width="20%">Username: </td>
                <td width="80%">
                <?php if(@$users->username!='') {?>
                <input type="text" name="txt_user" style="width:200px" value="<?php echo $users->username;?>"  />
                <?php } else {?>
                <input type="text" name="txt_user" style="width:200px" value="<?php echo set_value('txt_user');?>"  />
                <?php } ?>   
                </td>
    </tr>  
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_user');?></span>
                </td>
    </tr> 
     <tr>
                <td width="20%">Password: </td>
                <td width="80%">
                <input type="password" name="txt_pass" style="width:200px" value="<?php echo set_value('txt_pass');?>"  />
                   
                </td>
    </tr> 
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_pass');?></span>
                </td>
    </tr>   
    
     <tr>
                <td width="20%">Re-Password: </td>
                <td width="80%">
                <input type="password" name="txt_pass2" style="width:200px" value=""  />
                   
                </td>
    </tr>  
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_pass2');?></span>
                </td>
    </tr> 
    <tr>
                <td width="20%">Email: </td>
                <td width="80%">
                 <?php if(@$users->email!='') {?>
                <input type="text" name="txt_email" style="width:200px" value="<?php echo $users->email;?>"  />
                <?php } else {?>
                <input type="text" name="txt_email" style="width:200px" value=""  />
                <?php } ?>  
                
                   
                </td>
    </tr>  
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_email');?></span>
                </td>
    </tr>
    <tr>
                <td width="20%">Fullname: </td>
                <td width="80%">
                <?php if(@$users->fullname!='') {?>
                <input type="text" name="txt_fullname" style="width:200px" value="<?php echo $users->fullname;?>"  />
                <?php } else {?>
                <input type="text" name="txt_fullname" style="width:200px" value=""  />
                <?php } ?>  
                
                   
                </td>
    </tr> 
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_fullname');?></span>
                </td>
    </tr>
     <tr>
                <td width="20%">Actvie/No active</td>
                <td width="80%">
                <input type="checkbox" name="txt_active" value="1" <?php if(@$users->active == '1') echo "checked"?>/>
                   
                </td>
    </tr> 
    <tr>
                <td width="20%">Group permission:</td>
                <td width="80%">
                	<select name="txt_group" style="width:120px">                    	
                        <option value="1" <?php if(@$users->level == '1') echo "selected"?>>Tester</option>
                        <option value="2" <?php if(@$users->level == '2') echo "selected"?>>Demo</option>
                    </select>
                   
                </td>
    </tr> 
    <tr>
                
    </tr>
    
    <tr>
                <td width="20%"></td>
                <td width="80%">
                <a  class="button" onclick="$('#frm_add').submit()" href="javascript:void(0)">Lưu lại</a>
                </td>
    </tr>
</table>
</form>
</div>